<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>二手物品-大连交通大学在线服务平台</title>
<link href="css/bootstrap.min.css" rel="stylesheet" />
<link href="css/common.css" rel="stylesheet" />
<link href="images/favicon.ico" rel="shortcut icon" />
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.js"></script>
<script src="js/bootstrapValidator.min.js"></script>
<script src="js/language/zh_CN.js"></script>
<script src="js/common.js"></script>
<script type="text/javascript">
	$(function() {
		var href = window.location.href; //获取当前页面的URL
		var a = href.substring(href.lastIndexOf('?')); //截取问号后面的内容
		if (href.lastIndexOf('?gid') > 0) {
			$("#i-secondhand").attr("src", "subpage/goods.jsp");//设置iframe的src
		}
		//if (href.lastIndexOf('?list') > 0) {
		//	$("#i-secondhand").attr("src", "subpage/er-show.jsp");//设置iframe的src
		//}
	});
</script>
</head>
<body>
	<%@include file="subpage/head.jsp"%>
	<div class="container">
		<div class="logo-div">
			<div class="img-logo">
				<img id="img-logo" src="images/logo.png" alt="大连交通大学" />
			</div>
			<div class="search-div">
				<form action="#" method="post" class="navbar-form">
					<div class="input-group">
						<span class="input-group-btn"> <label for="sel-search" class="sr-only"></label> <select
							class="form-control" name="type" id="sel-search">
								<option value="goods">二手物品</option>
								<option value="news">新闻资讯</option>
								<option value="lost">失物招领</option>
						</select></span> <input class="form-control" type="text" name="wd" placeholder="请输入要查找的内容" /> <span
							class="input-group-btn">
							<button id="btn-search" type="submit" class="btn btn-default">搜索</button>
						</span>
					</div>
				</form>
			</div>
			<div class="img-er">
				<img id="img-er" src="images/er.png" width="90px" height="90px" alt="二维码" />
			</div>
		</div>
		<nav class="navbar navbar-default">
			<ul class="nav nav-pills nav-justified">
				<li><a href="index.jsp">首页</a></li>
				<li class="active"><a href="secondhand.jsp">二手物品</a></li>
				<li><a href="lost.jsp">失物招领</a></li>
				<li><a href="news.jsp">新闻资讯</a></li>
				<li><a href="car.jsp">校车查询</a></li>
				<c:if test="${not empty user}">
					<li><a href="user.jsp">用户中心</a></li>
				</c:if>
			</ul>
		</nav>
	</div>
	<br />

	<div class="container">
		<div class="row">
			<div class="col-md-3">
				<div class="list-group">
					<p class="list-group-item active">
						<img src="images/ershou.png" width="20px" height="20px" alt="" /> 商品分类
					</p>
					<ul class="nav nav-pills nav-stacked">
						<li><a href="index/goods_show_list.do?type=1" class="list-group-item-info">二手电脑</a></li>
						<li><a href="index/goods_show_list.do?type=2" class="list-group-item-info">二手手机</a></li>
						<li><a href="index/goods_show_list.do?type=3" class="list-group-item-info">二手家电</a></li>
						<li><a href="index/goods_show_list.do?type=4" class="list-group-item-info">二手书籍</a></li>
						<li><a href="index/goods_show_list.do?type=5" class="list-group-item-info">二手其他</a></li>
					</ul>
				</div>
				<div class="list-group">
					<p class="list-group-item active">
						<img src="images/ershou.png" width="20px" height="20px" alt="" /> 最新二手
					</p>
					<c:forEach items="${application.index_goods}" var="goods" begin="0" end="4">
						<a href="index/goods_show.do?gid=${goods.gid}" class="thumbnail">
							<p class="price">
								<img src="${goods.imgurl}" style="width: 64px; height: 64px;" alt="${goods.name}">
								￥${goods.price}
							</p>
							<p>${goods.name}</p>
						</a>
					</c:forEach>
				</div>
			</div>
			<div class="col-md-9">
				<div id="detail-div-er" class="detail-div-er">
					<iframe id="i-secondhand" src="subpage/er-show.jsp" width="100%" height="860px" marginHeight="0"
						marginWidth="0" frameborder="0" scrolling="0" name="i-secondhand"> </iframe>
				</div>

			</div>
		</div>
	</div>
	<div class="container">
		<div class="er-foot-div">
			<!-- 底部栏 -->
			<%@include file="subpage/footer.jsp"%>
		</div>
	</div>
	<!--end body div-->
</body>
</html>